/**
 *                            License
 * THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS  
 * CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). 
 * THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW.  
 * ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR  
 * COPYRIGHT LAW IS PROHIBITED.
 * 
 * BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND  
 * AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE  
 * MAY BE CONSIDERED TO BE A CONTRACT,
 * THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED 
 * HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS.
 * 
 */
package lineage.ui.function.window.main;

import lineage.ui.customize.L1CustomizeFrame;

/**
 * 主窗口.
 * 
 * @version 2014年2月14日上午11:16:02
 * @author jrwz
 */
public final class L1Window extends L1CustomizeFrame {
    private static final long serialVersionUID = 3431344233299569124L;

    /**
     * 静态初始化器，由JVM来保证线程安全.
     */
    private static class Holder {
        static L1Window instance = new L1Window();
    }

    /**
     * 取得该类的实例.
     */
    public static L1Window getInstance() {
        return Holder.instance;
    }

    private L1Window() {
        // 要设置的部分
        _x = 50;
        _y = 50;
        imgURL = "./image/frame/0.png";
        // visibility = 0.5f;
        // end

        init(true);
        getButtonClosed().setEnabled(false); // 禁用关闭按钮
    }

    @Override
    public void add() {
        super.add();
        getPanel().add(L1PanelBoxChat.getInstance()); // 增加聊天主面板
        getPanel().add(L1PanelButtonSwitchBoxChat.getInstance()); // 增加聊天框切换按钮面板
        getPanel().add(L1PanelBoxListOnlinePc.getInstance()); // 增加放置在线角色列表框相关组件的面板
        // 测试
        // end
    }
}